-- GENERATED SPELL FOR [Ethereal Theurgist] --


function spell0_18315(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(17145,pUnit)
pUnit:RegisterEvent('Sorts_18315', 6317, 1)
end

function spell1_18315(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(38064,pUnit)
pUnit:RegisterEvent('Sorts_18315', 6257, 1)
end

function spell2_18315(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18315', 9500, 1)
end

function spell3_18315(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18315', 554, 1)
end

function spell4_18315(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(34920,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18315', 559, 1)
end

function Sorts_18315(pUnit, Event)
local choix_sorts_18315 = math.random(0, 4)
if choix_sorts_18315 == 0 then
pUnit:RegisterEvent('spell0_18315', 1, 1)
end
if choix_sorts_18315 == 1 then
pUnit:RegisterEvent('spell1_18315', 1, 1)
end
if choix_sorts_18315 == 2 then
pUnit:RegisterEvent('spell2_18315', 1, 1)
end
if choix_sorts_18315 == 3 then
pUnit:RegisterEvent('spell3_18315', 1, 1)
end
if choix_sorts_18315 == 4 then
pUnit:RegisterEvent('spell4_18315', 1, 1)
end
end

function mob18315_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18315', math.random(1500, 3000), 1)
end

function mob18315_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18315_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18315_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18315, 1, 'mob18315_Action')
RegisterUnitEvent(18315, 2, 'mob18315_Leave')
RegisterUnitEvent(18315, 3, 'mob18315_Kill')
RegisterUnitEvent(18315, 4, 'mob18315_Die')
